game_manager
{
	spawn
	{
		wm_axis_respawntime 30
		wm_allied_respawntime 20
		wm_number_of_objectives 7
		wm_set_round_timelimit 15

		//obj
		//1: break into Garage
		//2: Build bridge
		//3: destroy radio
		//4: destroy generator
		//5: build foot bridge
		//6: destroy cellar blockage
		//7: capture forward spawn
		//8: construct command post

		wm_set_main_objective		3	0
		wm_set_main_objective		3	1		

		wm_objective_status 1 1 0
		wm_objective_status 1 0 0
		wm_objective_status 2 1 0
		wm_objective_status 2 0 0
		wm_objective_status 3 1 0
		wm_objective_status 3 0 0
		wm_objective_status 4 1 0
		wm_objective_status 4 0 0
		wm_objective_status 5 1 0
		wm_objective_status 5 0 0
		wm_objective_status 6 1 2
		wm_objective_status 6 0 1
		wm_objective_status 7 1 0
		wm_objective_status 7 0 0
		
		wm_set_defending_team 0
		wm_setwinner 0

		setautospawn	"Garage Spawn"	0
		setautospawn	"Deserted Cabin"	1
		
		globalaccum 1 set 0
		globalaccum 2 set 1

		wait 2000
		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "radar_axis_entrances_defend"
		wm_addteamvoiceannounce 0 "radar_axis_bunker_stop"
		wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

		wm_addteamvoiceannounce 1 "allies_hq_compost_construct"
		wm_addteamvoiceannounce 1 "radar_allies_entrances_destroy"
		wm_addteamvoiceannounce 1 "radar_allies_bunker_capture"

		wm_teamvoiceannounce 0 "radar_axis_entrances_defend"
		wm_teamvoiceannounce 0 "radar_axis_bunker_stop"
		wm_teamvoiceannounce 0 "axis_hq_compost_construct"

		wm_teamvoiceannounce 1 "allies_hq_compost_construct"
		wm_teamvoiceannounce 1 "radar_allies_entrances_destroy"
		wm_teamvoiceannounce 1 "radar_allies_bunker_capture"
		// *---------------------------------------------------------------------------------*
		enablespeaker forcefield_sound
		enablespeaker generator_sound
		disablespeaker sensor_sound
	}
}
//Garage Flag
checkpoint
{
	spawn
	{
		accum 0 set 0	// Who has the flag: 0-Axis, 1-Allied
	}

	trigger axis_capture	// Flag has been touched by an Axis player
	{
		accum 0 abort_if_equal 0 // do Axis own flag?

		accum 0 set 0 // Axis own the pole
		wm_announce	"Axis reclaim the Garage!"

		setstate flagwolf default
		setstate flagspawn default

		alertentity flagwolf
		alertentity flagspawn

		setautospawn	"Garage Spawn"	0
		setautospawn	"Deserted Cabin"	1

		
		wm_objective_status	6 0 1
		wm_objective_status	6 1 2
		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "radar_axis_bunker_stop"

		wm_addteamvoiceannounce 1 "radar_allies_bunker_capture"

		wm_teamvoiceannounce 0 "radar_axis_bunker_reclaimed"

		wm_teamvoiceannounce 1 "radar_allies_bunker_reclaimed"
		// *---------------------------------------------------------------------------------*
	}

	trigger allied_capture	// Flag has been touched by an allied player
	{
		accum 0 abort_if_equal 1 // do Allies own flag?

		accum 0 set 1 // Allied own the flag
		wm_announce	"Allies capture the Garage!"

		setstate flagwolf default
		setstate flagspawn default

		alertentity flagwolf
		alertentity flagspawn

		setautospawn	"Garage Spawn"	1
		setautospawn	"Research Complex"	0

		wm_objective_status	6 0 2
		wm_objective_status	6 1 1
		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 0 "radar_axis_bunker_captured"

		wm_teamvoiceannounce 1 "radar_allies_bunker_captured"

		wm_removeteamvoiceannounce 0 "radar_axis_bunker_stop"

		wm_removeteamvoiceannounce 1 "radar_allies_bunker_capture"
		// *---------------------------------------------------------------------------------*
	}
	
}

garagedoor_obj1
{
	spawn
	{
		wait 200
		
		constructible_class 3

	}

	death
	{
		wm_announce "Allies have breached the Garage Door"

		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 0 "radar_axis_entrance1_destroyed"
		wm_teamvoiceannounce 1 "radar_allies_entrance1_destroyed"
		wm_addteamvoiceannounce 0 "fueldump_axis_bridge_stop"

		wm_addteamvoiceannounce 1 "fueldump_allies_bridge_construct"

		wm_teamvoiceannounce 0 "fueldump_axis_bridge_stop"
		wm_teamvoiceannounce 0 "axis_hq_compost_construct"

		wm_teamvoiceannounce 1 "fueldump_allies_bridge_construct"
		wm_removeteamvoiceannounce 0 "radar_axis_entrances_defend"

		wm_removeteamvoiceannounce 1 "radar_allies_entrances_destroy"
		// *---------------------------------------------------------------------------------*

		wm_objective_status	1 0 2
		wm_objective_status	1 1 1
	}
}
cellar
{
	spawn
	{
		wait 200
		
		constructible_class 3

	}

	death
	{
		wm_objective_status	5 0 2
		wm_objective_status	5 1 1
		wm_announce	"Allies have breached the cellar!"
		
	}
}		
radio
{
	spawn
	{
		wait 200
		
		constructible_class 3

	}

	death
	{
		wm_announce	"Allies destroyed the communications radio!"		

		// Set the round winner:  0 == AXIS, 1 == ALLIED
		wm_setwinner 1
		
		// End the round
		wm_endround
	}
}		
generator
{
	spawn
	{
		wait 200
		trigger generator setup
		constructible_class 2

	}

	trigger setup
	{
		setstate generator default

		setstate generator_model_crates invisible
		setstate generator_model_flag invisible
		setstate generator_clip invisible
	}

	buildstart final
	{
		setstate generator underconstruction

		setstate generator_model_crates default
		setstate generator_model_flag default
		setstate generator_clip default
	}

	built final
	{
		setstate generator default

		setstate generator_model_crates invisible
		setstate generator_model_flag invisible
		setstate generator_clip invisible

		trigger bridgedoor close

		enablespeaker generator_sound

		wm_announce	"The Generator has been constructed!"
		
		wm_objective_status 3 1 2
		wm_objective_status 3 0 1
	}

	death
	{
		setstate generator invisible

		setstate generator_model_crates default
		setstate generator_model_flag default
		setstate generator_clip default

		trigger bridgedoor open

		disablespeaker generator_sound

		wm_announce	"The Generator has been damaged!"

		wm_objective_status 3 1 1
		wm_objective_status 3 0 2
	}

	decayed final
	{
		setstate generator invisible

		setstate generator_model_crates default
		setstate generator_model_flag default
		setstate generator_clip default
	}
}
basement_gun
{
	spawn
	{
		wait 200
		constructible_class 2
		
		setstate basement_mg42 invisible
		setstate basement_gun invisible
		setstate basement_clip default
		setstate basement_model_flag default
		setstate basement_model_crates default
	}

	buildstart final
	{
		setstate basement_mg42 underconstruction
		setstate basement_gun underconstruction
		setstate basement_clip default
		setstate basement_model_flag default
		setstate basement_model_crates default
	}

	built final
	{
		setstate basement_mg42 default
		setstate basement_gun default
		setstate basement_clip invisible
		setstate basement_model_flag invisible
		setstate basement_model_crates invisible

		wm_announce	"Cellar MG42 Constructed!"
	}

	decayed final
	{
		setstate basement_mg42 invisible
		setstate basement_gun invisible
		setstate basement_clip default
		setstate basement_model_flag default
		setstate basement_model_crates default
	}

	death
	{
		repairmg42 basement_mg42

		setstate basement_mg42 invisible
		setstate basement_gun invisible
		setstate basement_clip default
		setstate basement_model_flag default
		setstate basement_model_crates default

		wm_announce	"Cellar MG42 Destroyed!"
	}
}
cabin_mg42_const
{
	spawn
	{
		wait 200
		constructible_class 2
		setstate cabin_mg42_sandbags invisible
		setstate cabin_mg42_const invisible
		setstate cabin_mg42 invisible
		setstate cabin_mg42_clip default
		setstate cabin_mg42_model_flag default
		setstate cabin_mg42_model_crates default
	}

	buildstart final
	{
		setstate cabin_mg42_const invisible
		setstate cabin_mg42_sandbags underconstruction
		setstate cabin_mg42 underconstruction
		setstate cabin_mg42_clip default
		setstate cabin_mg42_model_flag default
		setstate cabin_mg42_model_crates default
	}

	built final
	{
		setstate cabin_mg42 default
		setstate cabin_mg42_const default
		setstate cabin_mg42_sandbags default
		setstate cabin_mg42_clip invisible
		setstate cabin_mg42_model_flag invisible
		setstate cabin_mg42_model_crates invisible

		wm_announce	"Outdoor Cabin MG42 Constructed!"
	}

	decayed final
	{
		setstate cabin_mg42 invisible
		setstate cabin_mg42_const invisible
		setstate cabin_mg42_sandbags invisible
		setstate cabin_mg42_clip default
		setstate cabin_mg42_model_flag default
		setstate cabin_mg42_model_crates default
	}

	death
	{
		setstate cabin_mg42 invisible
		setstate cabin_mg42_const invisible
		setstate cabin_mg42_sandbags invisible
		repairmg42 cabin_mg42

		setstate cabin_mg42_clip default
		setstate cabin_mg42_model_flag default
		setstate cabin_mg42_model_crates default

		wm_announce	"Outdoor Cabin MG42 Destroyed!"
	}
}
cabin_mg42_const2
{
	spawn
	{
		wait 200
		constructible_class 2
		setstate cabin_mg42_const2 invisible
		setstate cabin_mg422 invisible
		setstate cabin_mg42_clip2 default
		setstate cabin_mg42_model_flag2 default
		setstate cabin_mg42_model_crates2 default
	}

	buildstart final
	{
		setstate cabin_mg42_const2 underconstruction
		setstate cabin_mg422 underconstruction
		setstate cabin_mg42_clip2 default
		setstate cabin_mg42_model_flag2 default
		setstate cabin_mg42_model_crates2 default
	}

	built final
	{
		setstate cabin_mg422 default
		setstate cabin_mg42_const2 default
		setstate cabin_mg42_clip2 invisible
		setstate cabin_mg42_model_flag2 invisible
		setstate cabin_mg42_model_crates2 invisible
	
		wm_announce	"Indoor Cabin MG42 Constructed!"
	}

	decayed final
	{
		setstate cabin_mg422 invisible
		setstate cabin_mg42_const2 invisible
		setstate cabin_mg42_clip2 default
		setstate cabin_mg42_model_flag2 default
		setstate cabin_mg42_model_crates2 default
	}

	death
	{
		setstate cabin_mg422 invisible
		setstate cabin_mg42_const2 invisible
		repairmg42 cabin_mg422

		setstate cabin_mg42_clip2 default
		setstate cabin_mg42_model_flag2 default
		setstate cabin_mg42_model_crates2 default
		
		wm_announce	"Indoor Cabin MG42 Destroyed!"
	}
}

alliedgarage_mg42
{
	spawn
	{
		wait 200
		constructible_class 2
		setstate alliedgarage_mg42 invisible
		setstate alliedgarage_mg42_actual invisible
		setstate garage_mg42_clip default
		setstate garage_mg42_model_flag default
		setstate garage_mg42_model_crates default
	}

	buildstart final
	{
		setstate alliedgarage_mg42 underconstruction
		setstate alliedgarage_mg42_actual underconstruction
		setstate garage_mg42_clip default
		setstate garage_mg42_model_flag default
		setstate garage_mg42_model_crates default
	}

	built final
	{
		setstate alliedgarage_mg42 default
		setstate alliedgarage_mg42_actual default
		setstate garage_mg42_clip invisible
		setstate garage_mg42_model_flag invisible
		setstate garage_mg42_model_crates invisible

		wm_announce	"Allies have Constructed the Garage MG42"
	}

	decayed final
	{
		setstate alliedgarage_mg42 invisible
		setstate alliedgarage_mg42_actual invisible
		setstate garage_mg42_clip default
		setstate garage_mg42_model_flag default
		setstate garage_mg42_model_crates default
	}

	death
	{
		setstate alliedgarage_mg42 invisible
		setstate alliedgarage_mg42_actual invisible
		repairmg42 alliedgarage_mg42_actual

		setstate garage_mg42_clip default
		setstate garage_mg42_model_flag default
		setstate garage_mg42_model_crates default

		wm_announce	"Axis have Destroyed the Garage MG42"
	}
}
axisgarage_mg42
{
	spawn
	{
		wait 200
		constructible_class 2
		setstate axisgarage_mg42 invisible
		setstate axisgarage_mg42_actual invisible
		setstate garage_mg42_clip default
		setstate garage_mg42_model_flag default
		setstate garage_mg42_model_crates default
	}

	buildstart final
	{
		setstate axisgarage_mg42 underconstruction
		setstate axisgarage_mg42_actual underconstruction
		setstate garage_mg42_clip default
		setstate garage_mg42_model_flag default
		setstate garage_mg42_model_crates default
	}

	built final
	{
		setstate axisgarage_mg42 default
		setstate axisgarage_mg42_actual default
		setstate garage_mg42_clip invisible
		setstate garage_mg42_model_flag invisible
		setstate garage_mg42_model_crates invisible

		wm_announce	"Axis have Constructed the Garage MG42"
	}

	decayed final
	{
		setstate axisgarage_mg42 invisible
		setstate axisgarage_mg42_actual invisible
		setstate garage_mg42_clip default
		setstate garage_mg42_model_flag default
		setstate garage_mg42_model_crates default
	}

	death
	{
		setstate axisgarage_mg42 invisible
		setstate axisgarage_mg42_actual invisible
		repairmg42 axisgarage_mg42_actual

		setstate garage_mg42_clip default
		setstate garage_mg42_model_flag default
		setstate garage_mg42_model_crates default

		wm_announce	"Allies have Destroyed the Garage MG42"
	}
}
covtdoor_null
{
	spawn
	{
		wait 200
		
		constructible_class 2
		setstate covtdoor default

	}

	death
	{
		setstate covtdoor invisible

		wm_announce	"Allies have Breached the Back Garage Door"
	}
}
footbridge
{
	spawn
	{
		wait 200
		trigger footbridge setup
		constructible_class 2

	}

	trigger setup
	{
		setstate footbridge invisible

		setstate footbridge_model_crates default
		setstate footbridge_model_flag default
		setstate footbridge_clip default
	}

	buildstart final
	{
		setstate footbridge underconstruction

		setstate footbridge_model_crates default
		setstate footbridge_model_flag default
		setstate footbridge_clip default
	}

	built final
	{
		setstate footbridge default

		setstate footbridge_model_crates invisible
		setstate footbridge_model_flag invisible
		setstate footbridge_clip invisible

		wm_objective_status 4 1 1
		wm_objective_status 4 0 2

		wm_announce	"Allies have Constructed the Foot Bridge"
	}

	death
	{
		setstate footbridge invisible

		setstate footbridge_model_crates default
		setstate footbridge_model_flag default
		setstate footbridge_clip default

		wm_objective_status 4 1 1
		wm_objective_status 4 0 2

		wm_announce	"Axis have Damaged the Foot Bridge"
	}

	decayed final
	{
		setstate footbridge invisible

		setstate footbridge_model_crates default
		setstate footbridge_model_flag default
		setstate footbridge_clip default
	}
}
bridge
{
	spawn
	{
		wait 200
		trigger bridge setup
		constructible_class 3

	}

	trigger setup
	{
		setstate bridge invisible

		setstate bridge_model_crates default
		setstate bridge_model_flag default
		setstate bridge_clip default
	}

	buildstart final
	{
		setstate bridge underconstruction

		setstate bridge_model_crates default
		setstate bridge_model_flag default
		setstate bridge_clip default
	}

	built final
	{
		setstate bridge default

		setstate bridge_model_crates invisible
		setstate bridge_model_flag invisible
		setstate bridge_clip invisible

		wm_objective_status 2 1 1
		wm_objective_status 2 0 2

		wm_announce	"Allies have Constructed the Bridge"

		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "fueldump_axis_bridge_destroy"
		wm_addteamvoiceannounce 0 "radar_axis_radars_defend"
		wm_teamvoiceannounce 0 "radar_axis_radars_defend"

		wm_removeteamvoiceannounce 0 "fueldump_axis_bridge_stop"
		wm_removeteamvoiceannounce 1 "fueldump_allies_bridge_construct"
		
		// *---------------------------------------------------------------------------------*

	}

	death
	{
		setstate bridge invisible

		setstate bridge_model_crates default
		setstate bridge_model_flag default
		setstate bridge_clip default

		wm_objective_status 2 1 2
		wm_objective_status 2 0 1

		wm_announce	"Axis have destroyed the Foot Bridge"
		
		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "fueldump_axis_bridge_stop"

		wm_addteamvoiceannounce 1 "fueldump_allies_bridge_construct"

		wm_teamvoiceannounce 0 "fueldump_axis_bridge_destroyed"

		wm_teamvoiceannounce 1 "fueldump_allies_bridge_construct"

		wm_removeteamvoiceannounce 0 "fueldump_axis_bridge_destroy"
		wm_removeteamvoiceannounce 0 "radar_axis_radars_defend"
		// *---------------------------------------------------------------------------------*

	}

	decayed final
	{
		setstate bridge invisible

		setstate tbridge_model_crates default
		setstate bridge_model_flag default
		setstate bridge_clip default
	}
}
labmg42
{
	spawn
	{
		wait 200
		constructible_class 2
		setstate labmg42 invisible
		setstate labmg42_actual invisible
		setstate labmg42_clip default
		setstate labmg42_model_flag default
		setstate labmg42_model_crates default
	}

	buildstart final
	{
		setstate labmg42 underconstruction
		setstate labmg42_actual underconstruction
		setstate labmg42_clip default
		setstate labmg42_model_flag default
		setstate labmg42_model_crates default
	}

	built final
	{
		setstate labmg42 default
		setstate labmg42_actual default
		setstate labmg42_clip invisible
		setstate labmg42_model_flag invisible
		setstate labmg42_model_crates invisible

		wm_announce	"Axis have Constructed the Lab MG42"
	}

	decayed final
	{
		setstate labmg42 invisible
		setstate labmg42_actual invisible
		setstate labmg42_clip default
		setstate labmg42_model_flag default
		setstate labmg42_model_crates default
	}

	death
	{
		setstate labmg42 invisible
		setstate labmg42_actual invisible
		setstate labmg42_clip default
		setstate labmg42_model_flag default
		setstate labmg42_model_crates default
		repairmg42 labmg42_actual
	
		wm_announce	"Allies have Destroyed the Lab MG42"
	}
}
//Command Post

allied_compost_built
{
	spawn
	{
		wait 400
		trigger allied_compost_built setup

		constructible_class 2
	}

	trigger setup
	{
		setchargetimefactor 1 soldier 1
		setchargetimefactor 1 lieutenant 1
		setchargetimefactor 1 medic 1
		setchargetimefactor 1 engineer 1
		setchargetimefactor 1 covertops 1
		sethqstatus 1 0
	}

	buildstart final
	{
		setstate allied_compost_built_model underconstruction
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible
	}

	built final
	{
		setstate allied_compost_built_model default
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible

		trigger allied_compost_built_model enable_allied_features

		enablespeaker allies_compost_sound
	}

	decayed final
	{
		setstate allied_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default
	}

	death
	{
		setstate allied_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default

		trigger allied_compost_built_model disable_allied_features

		disablespeaker allies_compost_sound
	}
}

allied_compost_built_model
{
	spawn
	{
		wait 400
		setstate allied_compost_built_model invisible
	}

	trigger enable_allied_features
	{
		setchargetimefactor 1 soldier 0.75
		setchargetimefactor 1 lieutenant 0.75
		setchargetimefactor 1 medic 0.75
		setchargetimefactor 1 engineer 0.75
		setchargetimefactor 1 covertops 0.75
		sethqstatus 1 1

		wm_announce	"Allied Command Post constructed. Charge speed increased!"

		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 0 "axis_hq_compost_constructed_allies"

		wm_teamvoiceannounce 1 "allies_hq_compost_constructed"

		wm_removeteamvoiceannounce 1 "allies_hq_compost_construct"
		// *---------------------------------------------------------------------------------*

		wm_objective_status 7 0 2
		wm_objective_status 7 1 1
	}

	trigger disable_allied_features
	{
		setchargetimefactor 1 soldier 1
		setchargetimefactor 1 lieutenant 1
		setchargetimefactor 1 medic 1
		setchargetimefactor 1 engineer 1
		setchargetimefactor 1 covertops 1
		sethqstatus 1 0

		wm_announce	"Axis team has destroyed the Allied Command Post!"

		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

		wm_addteamvoiceannounce 1 "allies_hq_compost_construct"

		wm_teamvoiceannounce 0 "axis_hq_compost_construct"

		wm_teamvoiceannounce 1 "allies_hq_compost_damaged"
		// *---------------------------------------------------------------------------------*

		wm_objective_status 7 0 0
		wm_objective_status 7 1 0
	}
}

axis_compost_built
{
	spawn
	{
		wait 400
		trigger axis_compost_built setup

		constructible_class 2
	}

	trigger setup
	{
		setchargetimefactor 0 soldier 1
		setchargetimefactor 0 lieutenant 1
		setchargetimefactor 0 medic 1
		setchargetimefactor 0 engineer 1
		setchargetimefactor 0 covertops 1
		sethqstatus 0 0
	}

	buildstart final
	{
		setstate axis_compost_built_model underconstruction
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible
	}

	built final
	{
		setstate axis_compost_built_model default
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible

		trigger axis_compost_built_model enable_axis_features

		enablespeaker axis_compost_sound
	}

	decayed final
	{
		setstate axis_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default
	}

	death
	{
		setstate axis_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default

		trigger axis_compost_built_model disable_axis_features

		disablespeaker axis_compost_sound
	}
}

axis_compost_built_model
{
	spawn
	{
		wait 400
		setstate axis_compost_built_model invisible
	}

	trigger enable_axis_features
	{
		setchargetimefactor 0 soldier 0.75
		setchargetimefactor 0 lieutenant 0.75
		setchargetimefactor 0 medic 0.75
		setchargetimefactor 0 engineer 0.75
		setchargetimefactor 0 covertops 0.75
		sethqstatus 0 1

		wm_announce	"Axis Command Post constructed. Charge speed increased!"

		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 0 "axis_hq_compost_constructed"

		wm_teamvoiceannounce 1 "allies_hq_compost_constructed_axis"

		wm_removeteamvoiceannounce 0 "axis_hq_compost_construct"
		// *---------------------------------------------------------------------------------*

		wm_objective_status 7 0 1
		wm_objective_status 7 1 2
	}

	trigger disable_axis_features
	{
		setchargetimefactor 0 soldier 1
		setchargetimefactor 0 lieutenant 1
		setchargetimefactor 0 medic 1
		setchargetimefactor 0 engineer 1
		setchargetimefactor 0 covertops 1
		sethqstatus 0 0

		wm_announce	"Allied team has destroyed the Axis Command Post!"

		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

		wm_addteamvoiceannounce 1 "allies_hq_compost_construct"

		wm_teamvoiceannounce 0 "axis_hq_compost_damaged"

		wm_teamvoiceannounce 1 "allies_hq_compost_construct"
		// *---------------------------------------------------------------------------------*

		wm_objective_status 7 0 0
		wm_objective_status 7 1 0
	}
}
//*********
//Sensor
//*********
sensor_tst
{
	spawn
	{
	}
	
	trigger main
	{
		globalaccum 2 abort_if_equal 0
		disablespeaker forcefield_sound
		setstate forcefield invisible
		enablespeaker sensor_sound
		trigger alarm_btn out
	}
}
alarm_tst
{
	spawn
	{
	}
	trigger main
	{
		globalaccum 2 abort_if_equal 1
		trigger alarm_btn in
	}
}
alarm_btn
{
	spawn
	{
	}
	trigger in
	{
		gotomarker alarm_btn_in 16
		playsound sound/movers/switches/butn2.wav
		
		disablespeaker sensor_sound
		enablespeaker forcefield_sound
		setstate forcefield default
		globalaccum 2 set 1
		
	}
	trigger out
	{
		gotomarker alarm_btn_out 16
		playsound sound/movers/switches/butn2.wav
		globalaccum 2 set 0		
		
	}
}
//***********************
//Switch Controlled Doors
//***********************
garagedoor2_trigger
{
	spawn
	{
		accum 6 set 0
		wait 500
		//trigger garagedoor2_trigger main
	}
	trigger main
	{
		globalaccum 1 abort_if_not_equal 0
		trigger garagedoor2_trigger up
		trigger garagedoor2_trigger down

	}
	trigger up
	{
			accum 6 abort_if_not_equal 1
			resetscript

			trigger garagedoor2_lever up
			accum 6 set 0
	}
	trigger down
	{
			accum 6 abort_if_not_equal 0
			resetscript

			trigger garagedoor2_lever down
			accum 6 set 1
	}
}

garagedoor2_lever
{
	spawn
	{
	}
	trigger down
	{
		gotomarker garagedoor2_lever_down 16
		playsound sound/movers/switches/switch.wav
		trigger garagedoor2 close
		
	}
	trigger up
	{
		gotomarker garagedoor2_lever_up 16
		playsound sound/movers/switches/switch.wav
		trigger garagedoor2 open
		
	}
}

garagedoor2
{
	spawn
	{
	}

	trigger open
	{
		wait 500
		playsound sound/movers/misc/garage_door_start_01.wav volume 127
		wait 350
		enablespeaker garagedoor2_sound
		gotomarker garagedoor2_pc1 17 wait
		disablespeaker garagedoor2_sound
		playsound sound/movers/misc/garage_door_end_01.wav volume 127
	}

	trigger close
	{
		wait 500
		playsound sound/movers/misc/garage_door_start_01.wav volume 127
		wait 350
		enablespeaker garagedoor2_sound
		gotomarker garagedoor2_pc2 17 wait
		disablespeaker garagedoor2_sound
		playsound sound/movers/misc/garage_door_end_01.wav volume 127
	}
}
bridgedoor
{
	spawn
	{
	}

	trigger open
	{
		wait 500
		playsound sound/movers/misc/big_gate1.wav volume 127
		wait 350
		enablespeaker bridgedoor_sound
		gotomarker bridgedoor_pc2 15 wait
		disablespeaker bridgedoor_sound
		playsound sound/movers/misc/big_gate3.wav volume 127
	}

	trigger close
	{
		wait 500
		playsound sound/movers/misc/big_gate1.wav volume 127
		wait 350
		enablespeaker bridgedoor_sound
		gotomarker bridgedoor_pc1 15 wait
		disablespeaker bridgedoor_sound
		playsound sound/movers/misc/big_gate3.wav volume 127
	}
}